package com.sdry.mapper.cb;

import com.sdry.model.cb.DepreciationEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface DepreciationMapper {
    int delete(Long id);

    int insert(DepreciationEntity depreciation);

    int insertDynamic(DepreciationEntity depreciation);

    int updateDynamic(DepreciationEntity depreciation);

    int update(DepreciationEntity depreciation);

    DepreciationEntity selectById(Long id);

    List<DepreciationEntity> findPageWithResult(@Param("date") String date, @Param("stockId") Long stockId);

    @Update("update cb_depreciation_t set del = 1 where id = #{id}")
    Integer setDelete(Long id);

    List<DepreciationEntity> listByDate(@Param("date") String date, @Param("stockId") Long stockId);
}
